#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>
#include <assert.h>
//char* my_strcpy(char* s2, const char* s1)
//{
//	assert(s2 && s1);
//	char* ret = s2;
//	while (*s2++ = *s1++)
//		;
//	return ret;
//}
//int main()
//{
//	char arr1[] = "hello bit";
//	char arr2[20] = "xxxxxxxxxxxxxxxxxx";
//	my_strcpy(arr2, arr1);
//	printf("%s\n", arr2);
//	return 0;
//}
char* my_strcat( char* s1, char* s2)
{
	assert(s1 && s2);
	char* p = s1;
	while (*s1 != '\0')
		s1++;
	while (*s1++ = *s2++)
		;
	return p;
}
int main()
{
	char arr1[20] = "hello";
	char arr2[] = "world";
	my_strcat(arr1, arr2);
	printf("%s\n", arr1);
	return 0;
}